home *** CD-ROM | disk | FTP | other *** search
/ Power Utilities / Power Utilities.iso / utility / pro36 / chd.doc < prev    next >
Encoding:
Text File  |  1987-01-28  |  2.3 KB  |  54 lines

  1. Name   - CHD.COM
  2. Source - CHD.C using the Datalight C Compiler v2.20
  3. Author - Stephen Barsky
  4. Date   - 1/28/87
  5.  
  6. CHD is a replacement for the DOS CHDIR command.  On my system, I've
  7. used the utility program DOSEDIT to actually replace the CD command
  8. with CHD.
  9.  
  10. CHD allows you to change directories without having to enter the
  11. entire path name.  The strategy is as follows:
  12.  
  13. 1) CHD tries to apply the CHDIR command directly to the name
  14.    specified on the command line.  For example, CHD \TURBO will first
  15.    try to make \TURBO the working directory.  CHD TURBO will try to
  16.    find a subdirectory called TURBO under the current working directory.
  17.    This is identical to the normal CHDIR command.
  18.  
  19. 2) If the first step fails, then CHD tries to find the specified
  20.    directory under the root directory.  For example, if you are
  21.    currently in the directory \TURBO and you enter CHD SNOBOL, an
  22.    attempt is made to find the subdirectory SNOBOL under \TURBO.  If
  23.    this fails, then an attempt is made to make \SNOBOL the current
  24.    directory.
  25.  
  26. 3) If the first two steps fail, then CHD tries to find any directory
  27.    or subdirectory whose name includes the name specified on the
  28.    command line.  The name search begins at the top of the root
  29.    directory, and works down, searching every subdirectory along the
  30.    way.  For example, if under your root directory you have 3
  31.    subdirectries, SNOBOL, COBOL, and SPITBOL (in that order), then
  32.    entering CHD BOL will place you in \SNOBOL.  Entering CHD SP will
  33.    place you in SPITBOL.
  34.  
  35. 4) If the first three steps fail, then CHD displays "Invalid
  36.    directory,"  just as with the normal CHDIR command.
  37.  
  38. 5) If no arguments are submitted to CHD, then the current directory
  39.    name is displayed, just as with the normal CHDIR command.
  40.  
  41. Limitations 
  42.  
  43. CHD will not apply steps 2 and 3 correctly is a drive specifier is used.
  44. For example, CHD C:\TUR will not find the directory \TURBO on the C
  45. drive.  CHD C:\TURBO will work correctly.
  46.  
  47.  
  48. The idea is to be able to traverse the directory tree without having
  49. to do a lot of typing or remembering exactly where everything is.
  50.  
  51. One note of caution - be sure that you use a DOS prompt that displays
  52. the name of your current directory.  This way you can always be sure
  53. that you are in the directory you expect to be in.
  54.